using System; 
using System.Collections.Generic; 
using System.Text; 
using FluentNHibernate.Mapping;

namespace Pcme.Info.MvcMusicStore.Models {
    
    
    public partial class OrderMap : ClassMap<Order> {
        
        public OrderMap() {
			Table("[Order]");
			LazyLoad();
			Id(x => x.OrderId).GeneratedBy.Identity().Column("OrderId");
			Map(x => x.OrderDate).Not.Nullable().Column("OrderDate");
			Map(x => x.Username).Column("Username");
			Map(x => x.FirstName).Column("FirstName");
			Map(x => x.LastName).Column("LastName");
			Map(x => x.Address).Column("Address");
			Map(x => x.City).Column("City");
			Map(x => x.State).Column("State");
			Map(x => x.PostalCode).Column("PostalCode");
			Map(x => x.Country).Column("Country");
			Map(x => x.Phone).Column("Phone");
			Map(x => x.Email).Column("Email");
			Map(x => x.Total).Not.Nullable().Column("Total");
            HasMany(x => x.OrderDetails).KeyColumn("OrderId");
        }
    }
}
